home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 4 / Amiga Tools 4.iso / tools / packer / gnutar / tar.man < prev   
Text File  |  1996-02-26  |  8KB  |  186 lines

  1.  
  2. NAME
  3.      tar - media file archiver
  4.  
  5. SYNOPSIS
  6.      tar -[BcDhikmopstvxzZ] [-b N] [-f F] [-T F] [ filename ... ]
  7.  
  8. DESCRIPTION
  9.      tar provides a way to store many files into a single
  10.      archive, which can be kept in another file, stored on
  11.      an I/O device such as tape, floppy, cartridge, or disk, or
  12.      piped to another program. It is useful for making backup
  13.      copies, or for packaging up a set of files to move them to
  14.      another system.
  15.  
  16.      When reading an archive, this version of tar continues after
  17.      finding an error.  Previous versions required the `i' option
  18.      to ignore checksum errors.
  19.  
  20. OPTIONS
  21.      tar options can be specified in either of two ways.  The
  22.      usual Unix conventions can be used: each option is preceded
  23.      by `-'; arguments directly follow each option; multiple
  24.      options can be combined behind one `-' as long as they take
  25.      no arguments.  For compatability with the Unix tar program,
  26.      the options may also be specified as ``keyletters,'' wherein
  27.      all the option letters occur in the first argument to tar,
  28.      with no `-', and their arguments, if any, occur in the
  29.      second, third, ...  arguments.  Examples:
  30.  
  31.           Normal:  tar -f arcname -cv file1 file2
  32.  
  33.           Old:  tar fcv arcname file1 file2
  34.  
  35.      At least one of the -c, -t, or -x options must be included.
  36.      The rest are optional.
  37.  
  38.      Files to be operated upon are specified by a list of file
  39.      names, which follows the option specifications (or can be
  40.      read from a file by the -T option).  Specifying a directory
  41.      name causes that directory and all the files it contains to
  42.      be (recursively) processed.  In general, specifying full
  43.      path names when creating an archive is a bad idea, since
  44.      when the files are extracted, they will have to be extracted
  45.      into exactly where they were dumped from.  Instead, cd to
  46.      the root directory and use relative file names.
  47.  
  48.      -b N Specify a blocking factor for the archive.  The block
  49.           size will be N x 512 bytes.  Larger blocks typically
  50.           run faster and let you fit more data on a tape.  The
  51.           default blocking factor is set when tar is compiled,
  52.           and is typically 20.  There is no limit to the maximum
  53.           block size, as long as enough memory can be allocated
  54.           for it, and as long as the device containing the
  55.           archive can read or write that block size.
  56.  
  57.      -B   When reading an archive, reblock it as we read it.
  58.           Normally, tar reads each block with a single read(2)
  59.           system call.  This does not work when reading from a
  60.           pipe or network socket under Berkeley Unix.  With this
  61.           option, it will do multiple read(2)s until it gets
  62.           enough data to fill the specified block size.  -B can
  63.           also be used to speed up the reading of tapes that were
  64.           written with small blocking factors, by specifying a
  65.           large blocking factor with -b and having tar read many
  66.           small blocks into memory before it tries to process
  67.           them.
  68.  
  69.      -c   Create an archive from a list of files.
  70.  
  71.      -D   With each message that tar produces, print the record
  72.           number within the archive where the message occurred.
  73.           This option is especially useful when reading damaged
  74.           archives, since it helps to pinpoint the damaged sec-
  75.           tion.
  76.  
  77.      -f F Specify the filename of the archive.  If the specified
  78.           filename is ``-'', the archive is read from the stan-
  79.           dard input or written to the standard output.  If this
  80.           option is not used, a default archive name (which was
  81.           picked when tar was compiled) is used.  The default is
  82.           normally set to the ``first'' tape drive or other tran-
  83.           sportable I/O medium on the system.
  84.  
  85.      -h   When creating an archive, if a symbolic link is encoun-
  86.           tered, dump the file or directory to which it points,
  87.           rather than dumping it as a symbolic link.
  88.  
  89.      -i   When reading an archive, ignore blocks of zeros in the
  90.           archive.  Normally a block of zeros indicates the end
  91.           of the archive, but in a damaged archive, or one which
  92.           was created by appending several archives, this option
  93.           allows tar to continue.  It is not on by default
  94.           because there is garbage written after the zeroed
  95.           blocks by the Unix tar program.
  96.  
  97.      -k   When extracting files from an archive, keep existing
  98.           files, rather than overwriting them with the version
  99.           from the archive.
  100.  
  101.      -m   When extracting files from an archive, set each file's
  102.           modified timestamp to the current time, rather than
  103.           extracting each file's modified timestamp from the
  104.           archive.
  105.  
  106.      -o   When creating an archive, write an old format archive,
  107.           which does not include information about directories,
  108.           pipes, or device files, and specifies file ownership by
  109.           uid's and gid's rather than by user names and group
  110.           names.  In most cases, a ``new'' format archive can be
  111.           read by an ``old'' tar program without serious trouble,
  112.           so this option should seldom be needed.
  113.  
  114.      -p   When extracting files from an archive, restore them to
  115.           the same permissions that they had in the archive.  If
  116.           -p is not specified, the current umask limits the per-
  117.           missions of the extracted files.  See umask(2).
  118.  
  119.      -t   List a table of contents of an existing archive.  If
  120.           file names are specified, just list files matching the
  121.           specified names.
  122.  
  123.      -s   When specifying a list of filenames to be listed or
  124.           extracted from an archive, the -s flag specifies that
  125.           the list is sorted into the same order as the tape.
  126.           This allows a large list to be used, even on small
  127.           machines, because the entire list need not be read into
  128.           memory at once.  Such a sorted list can easily be
  129.           created by running ``tar -t'' on the archive and edit-
  130.           ing its output.
  131.  
  132.      -T F Rather than specifying the file names to operate on as
  133.           arguments to the tar command, this option specifies
  134.           that the file names should be read from the file F, one
  135.           per line.  If the file name specified is ``-'', the
  136.           list is read from the standard input.  This option, in
  137.           conjunction with the -s option, allows an arbitrarily
  138.           large list of files to be processed, and allows the
  139.           list to be piped to tar.
  140.  
  141.      -v   Be verbose about the files that are being processed or
  142.           listed.  Normally, archive creation or file extraction
  143.           are silent, and archive listing just gives file names.
  144.           The -v option causes an ``ls -l''-like listing to be
  145.           produced.
  146.  
  147.      -x   Extract files from an existing archive.  If file name
  148.           are specified, just extract files matching the speci-
  149.           fied names, otherwise extract all the files in the
  150.           archive.
  151.  
  152.      -z or -Z
  153.           When extracting or listing an archive, these options
  154.           specify that the archive should be decompressed while
  155.           it is read, using the -d option of the compress(1) pro-
  156.           gram.  The archive itself is not modified.
  157.  
  158. BUGS
  159.      The r, u, w, X, l, F, C, and digit options of Unix tar are
  160.      not supported.
  161.  
  162.      It should be possible to create a compressed archive with
  163.      the -z option.
  164.  
  165.  
  166. NOTES ON AMIGA VERSION:
  167.  
  168.      The following notes appeared together with the GCC port of V1.09.
  169.      You'd have to check out by yourself, whether these are still
  170.      valid for the SAS/C V1.11.2 port. -AK, 16 Sep 95
  171.  
  172. Addendum for Version 1.1:
  173.  
  174.      The -p option for extracting files with their dates
  175.      preserved is now supported (under AmigaDos 1.2 only; do not
  176.      try to use this option under AmigaDos 1.1).
  177.  
  178. Addendum for Version 1.2:
  179.  
  180.      The -p option now works on floppies as well as ram:. Various
  181.      internal hacking has been done, and things are slightly
  182.      different than before. The date conversion is now aware that
  183.      it's summertime, and not wintertime (a change noticble only
  184.      to people who've been porting tar archives back and forth
  185.      between Unix and the Amiga).
  186.